public class O11 {
    public static void main(String[] args) {
        O11 o = new O11();
        System.out.println(o.minArray(new int[]{1,1}));
    }
    public int minArray(int[] numbers) {
        if (numbers.length==1)
            return numbers[0];
        if (numbers[0]<numbers[numbers.length-1])
            return numbers[0];
        int l = 0,r = numbers.length-1,mid = (l+r)/2;
        while (l<=r&&mid>=0&&mid<numbers.length-1){
            if (numbers[mid]>numbers[mid+1])
                return numbers[mid+1];
            else if (numbers[mid]>=numbers[0]){
                l = mid+1;
            }else r = mid -1;
            mid = (l+r)/2;
        }
        return numbers[0];
    }
}
